<!DOCTYPE html>
<html>
<head>
<title>Html</title>

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

</head>
<body>
	<!-- 1.定义并创建对象实例 -->
	1.定义并创建对象实例
	<br />
	<script>
		people = new Object();
		people.name = "Micky";
		people.age = "22";
		document.write("name:" + people.name + "<br />");
		document.write("age:" + people.age);
	</script>
	<br />
	<script>
		people = {
			name : "Jack",
			age : "23"
		};
		document.write("name:" + people.name + "<br />");
		document.write("age:" + people.age);
	</script>
	<br />
	<!-- 2.使用函数并定义对象,然后创建新的对象实例 -->
	<script>
		function people(name, age) {
			this.name = name;
			this.age = age;
		}
		son = new people("小明", 22);

		document.write("name:" + son.name + "<br />");
		document.write("age:" + son.age);
	</script>

</body>
</html>
